package com.tanguy.user.bean;

import com.tanguy.user.bean.orde.OrderBean;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by dab on 2017/11/17 0017 16:19
 */

public class HomeBean {

    private List<OrderBean> order;
    private List<BannerBean> banner;

    public ArrayList<String> getBannerStringList() {
        ArrayList<String> strings = new ArrayList<>();
        if (banner == null) {
            return strings;
        }
        for (int i = 0; i < banner.size(); i++) {
            strings.add(banner.get(i).getImg());
//            strings.add("http://101.37.148.119/resources/upload/images/1507371839660.jpg");
//            strings.add("http://xld-test.oss-cn-shenzhen.aliyuncs.com/tangguy/image/1510886477019.jpg");
        }
        return strings;
    }

    public List<OrderBean> getOrder() {
        return order;
    }

    public void setOrder(List<OrderBean> order) {
        this.order = order;
    }

    public List<BannerBean> getBanner() {
        return banner;
    }

    public void setBanner(List<BannerBean> banner) {
        this.banner = banner;
    }

    public static class BannerBean {
        /**
         * id : 1
         * addtime : 1510297735000
         * title : banner
         * sort : 1
         * img : img
         * type : 2
         * url : www.baidu.com
         * state : 1
         * isdelete : 1
         * genre : 1
         */

        private int id;
        private long addtime;
        private String title;
        private int sort;
        private String img;
        private int type;//1=不跳转 2=内部跳转 3=外部跳转
        private String url;
        private int state;
        private int isdelete;
        private int genre;

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public long getAddtime() {
            return addtime;
        }

        public void setAddtime(long addtime) {
            this.addtime = addtime;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public int getSort() {
            return sort;
        }

        public void setSort(int sort) {
            this.sort = sort;
        }

        public String getImg() {
            return img;
        }

        public void setImg(String img) {
            this.img = img;
        }

        public int getType() {
            return type;
        }

        public void setType(int type) {
            this.type = type;
        }

        public String getUrl() {
            return url;
        }

        public void setUrl(String url) {
            this.url = url;
        }

        public int getState() {
            return state;
        }

        public void setState(int state) {
            this.state = state;
        }

        public int getIsdelete() {
            return isdelete;
        }

        public void setIsdelete(int isdelete) {
            this.isdelete = isdelete;
        }

        public int getGenre() {
            return genre;
        }

        public void setGenre(int genre) {
            this.genre = genre;
        }
    }
}
